package com.lizhenhua.orderitemadd.controller;

import com.lizhenhua.fmmall.entity.ShoppingCartVo;
import com.lizhenhua.orderitemadd.service.OrderItemAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping(value = "/order-item")
public class OrderItemAddController {
    @Autowired
    private OrderItemAddService orderItemAddService;


    @PostMapping("/save")
    public int addOrderItem(@RequestBody List<ShoppingCartVo> list, @RequestParam("orderId") String orderId) {

        System.out.println("执行了orderitem-add");;

        return orderItemAddService.saveOrder(list, orderId);
    }
}
